\usepackage{fapapersize}
\usefapapersize{*,*,30mm,*,30mm,*}
%\setlength{\textwidth}{40em}
\setlength{\sidebarwidth}{20pt}
\setlength{\marginparwidth}{0pt}
\setlength{\oddsidemargin}{20pt}
\setlength{\evensidemargin}{20pt}


\usepackage{graphics}
\usepackage[svgnames]{xcolor}
\usepackage{fancyvrb}
\disablekoreanfonts
\setmainfont[Mapping=tex-text]{나눔명조}
\setsansfont[Mapping=tex-text]{나눔고딕}
\setmonofont{나눔고딕코딩}
\setmonoscale{0.9}
%\setkormainfont(* ExtraBold)(*){나눔명조}(){바탕}
%\setkorsansfont(* ExtraBold)(*){나눔고딕}

%%%%%%%%%%%% KTUGFaq:Karnes/Oblivoir/FAQ#2.4
\definecolor{nicered}{rgb}{.647,.129,.149}

\makeatletter
\newlength{\numberheight}
\makechapterstyle{TroelsPedersen}{%
\renewcommand{\chapnamefont}{\normalfont\LARGE\itshape}
\renewcommand{\chapnumfont}{\normalfont\HUGE\itshape\color{nicered}}
\renewcommand{\chaptitlefont}{\normalfont\huge\itshape\color{nicered}}
\renewcommand{\afterchapternum}{}
\renewcommand{\printchaptername}{} %%% meaningless in memhangul
\renewcommand{\prechapternum}{} %%% memhangul
\renewcommand{\postchapternum}{} %%% memhangul
\renewcommand{\hchaptertitlehead}{\thechapter.} %%% memhangul
\setlength{\numberheight}{20mm}
\renewcommand{\chapternamenum}{}%
\renewcommand{\printchapternum}{%
	\sidebar{%
		\makebox[20pt][c]{%
			\resizebox{!}{\numberheight}{%
				\chapnumfont\thechapter%
			}%
		}%
	}%
}%
\renewcommand\printchaptertitle[1]{\chaptitlefont##1}
\setlength{\beforechapskip}{20pt}
\setlength{\midchapskip}{0pt}
\setlength{\afterchapskip}{10pt}
\setlength{\cftchapterindent}{0pt}
\setlength{\cftchapternumwidth}{1.8em}
\setlength{\cftbeforechapterskip}{1.8em}
}
\makeatother

\AtBeginDocument{% 
\oblivoirchapterstyle{TroelsPedersen}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%
% script environment
%%%%%%%%%%%%%%%%%%%%%%%%%%
\DefineVerbatimEnvironment
	{script}{Verbatim}
	{frame=single, baselinestretch=1,
	 fontsize=\footnotesize}
%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%
% Engine Style Command
%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\ekvars}{\textbf}
\newcommand{\ekcmd}{\emph}
%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title Page
\makeatletter
\def\thickhrulefill{\leavevmode \leaders \hrule height 1pt\hfill \kern \z@}
\renewcommand{\maketitle}{%\begin{titlepage}%
    \let\footnotesize\small
    \let\footnoterule\relax
    \parindent \z@
    \reset@font
    \null
    \vskip 10\p@
    \hbox{\mbox{%
        \hspace{4pt}%
        \fbox{\includegraphics[width=3em]{images/logo}}%
        \hspace{4pt}
        }%
      \vrule depth 0.9\textheight%
      \mbox{\hspace{2em}}
      \vtop{% %%%%%%%%%%%%%%%%%%
        \vskip 40\p@
        \begin{flushleft}
          \Large \@author \par
        \end{flushleft}
        \vskip 80\p@
        \begin{flushleft}
          \huge \bfseries \@title \par
        \end{flushleft}
        \vfil
        }}
    \null
  %\end{titlepage}%
  \setcounter{footnote}{0}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%

\addtodef{\quote}{\small}{}
\addtodef{\itemize}{\small}{}
\addtodef{\enumerate}{\small}{}

\settocdepth{subsection}
\counterwithin{footnote}{chapter}
\setlength{\parskip}{1.2em plus 0.3em minus 0.2em}